package com.wtwd.campus.h5_manager.dao;

import com.wtwd.campus.entity.ThirdPartDeviceVO;
import com.wtwd.campus.h5_manager.entity.H5DeviceSetting;
import com.wtwd.campus.h5_manager.entity.H5Deviceinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface H5DeviceSettingMapper {
    //根据设备id查询一条设置信息
    H5DeviceSetting getDeviceSettingByImei(String imei);
    //设置设备信息
    Integer modifyDeviceSetting(@Param("data") H5DeviceSetting data);

    H5DeviceSetting getDeviceSettingByDeviceId(@Param("deviceId") Integer deviceId);

    Integer addDeviceSetting(@Param("deviceSetting") H5DeviceSetting deviceSetting);

    /**
     *初始化设备设置表
     * @param deviceInfos
     * @return
     */
    Integer batchInitializeDeviceSetting(@Param("list") List<H5Deviceinfo> deviceInfos);

    Integer delDeviceSettingByDeviceId(@Param("deviceId") Integer deviceId);

    List<Map<String,Object>> getH5ThirdPartDeviceList(@Param("data") ThirdPartDeviceVO data);

    List<Map<String,Object>> getOtherThirdPartDeviceList(@Param("data") ThirdPartDeviceVO data);

    int deleteSOSList(@Param("deviceId") Integer deviceId);

    int modifySilentSwitchByDeviceId(@Param("deviceId") Integer deviceId, @Param("flag") Integer flag);
}
